<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: RSAMConstMappingIterator Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00188.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">RSAMConstMappingIterator Class Reference<div class="ingroups"><a class="el" href="a00510.html">phyLayer - physical layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="RSAMConstMappingIterator" --><!-- doxytag: inherits="ConstMappingIterator" -->
<p>ConstMapingIterator implementation for a RSAM.  
 <a href="a00188.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00303_source.html">PhyUtils.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for RSAMConstMappingIterator:</div>
<div class="dyncontent">
<div class="center"><img src="a00983.png" border="0" usemap="#RSAMConstMappingIterator_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for RSAMConstMappingIterator:</div>
<div class="dyncontent">
<div class="center"><img src="a00984.png" border="0" usemap="#RSAMConstMappingIterator_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00985.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88568a19f3ddbae8645fdabffc2dc2a5"></a><!-- doxytag: member="RSAMConstMappingIterator::RSAMConstMappingIterator" ref="a88568a19f3ddbae8645fdabffc2dc2a5" args="(const RadioStateAnalogueModel *rsam, simtime_t_cref signalStart, simtime_t_cref signalEnd)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a88568a19f3ddbae8645fdabffc2dc2a5">RSAMConstMappingIterator</a> (const <a class="el" href="a00182.html">RadioStateAnalogueModel</a> *<a class="el" href="a00188.html#aad2e47c90690500114b0715ac93fdea0">rsam</a>, simtime_t_cref <a class="el" href="a00188.html#a44e62faddab1436a85e70e80d00080ab">signalStart</a>, simtime_t_cref <a class="el" href="a00188.html#a1f51b46c71a890d8331afb993bf1cc54">signalEnd</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the iterator with the passed values. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a3740e6b65c335fcde632e296b56070de">jumpTo</a> (const <a class="el" href="a00013.html">Argument</a> &amp;pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the iterator point to the passed position.  <a href="#a3740e6b65c335fcde632e296b56070de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a082fa16cd2eaa7ac2dd0b16b66660317">setNextPosition</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function that sets member nextPosition. Presumes that iterator it and member position are set correctly.  <a href="#a082fa16cd2eaa7ac2dd0b16b66660317"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a3a34a4fb1e22f7e0bbac13e21d08415e">jumpToBegin</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the iterator point to the begin of the function.  <a href="#a3a34a4fb1e22f7e0bbac13e21d08415e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7694574b32a82ddbfa3e86bed32be016"></a><!-- doxytag: member="RSAMConstMappingIterator::iterateTo" ref="a7694574b32a82ddbfa3e86bed32be016" args="(const Argument &amp;pos)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a7694574b32a82ddbfa3e86bed32be016">iterateTo</a> (const <a class="el" href="a00013.html">Argument</a> &amp;pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates to the specified position. This method should be used if the new position is near the current position. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a919ae04b93ed239dc2f5566a383f28d4">next</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates to the next position of the function.  <a href="#a919ae04b93ed239dc2f5566a383f28d4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a7dd83432a7cd3ff5d1f827cb34f61a32">inRange</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the current position of the iterator is in range of the function.  <a href="#a7dd83432a7cd3ff5d1f827cb34f61a32"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a5d0e40bb42450fb2158e6172cc27d1"></a><!-- doxytag: member="RSAMConstMappingIterator::hasNext" ref="a1a5d0e40bb42450fb2158e6172cc27d1" args="() const " -->
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a1a5d0e40bb42450fb2158e6172cc27d1">hasNext</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the iterator has a next value inside its range. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af465b20a9a50c6640289e7f53f26134d"></a><!-- doxytag: member="RSAMConstMappingIterator::getPosition" ref="af465b20a9a50c6640289e7f53f26134d" args="() const " -->
virtual const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#af465b20a9a50c6640289e7f53f26134d">getPosition</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current position of the iterator. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35441df57b5a398c15aefd4696ac9e44"></a><!-- doxytag: member="RSAMConstMappingIterator::getNextPosition" ref="a35441df57b5a398c15aefd4696ac9e44" args="() const " -->
virtual const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a35441df57b5a398c15aefd4696ac9e44">getNextPosition</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the position the next call to "next()" of this Iterator would iterate to. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59275f8855f0bda32e25116da54dcd2f"></a><!-- doxytag: member="RSAMConstMappingIterator::getValue" ref="a59275f8855f0bda32e25116da54dcd2f" args="() const " -->
virtual argument_value_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a59275f8855f0bda32e25116da54dcd2f">getValue</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value of the function at the current position. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8387043b9b90a5ea75d3d968cbb87f10"></a><!-- doxytag: member="RSAMConstMappingIterator::iterateToOverZeroSwitches" ref="a8387043b9b90a5ea75d3d968cbb87f10" args="(simtime_t_cref t)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a8387043b9b90a5ea75d3d968cbb87f10">iterateToOverZeroSwitches</a> (simtime_t_cref t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates to valid entry for timepoint t over all zero-time switches starting from the current position of iterator it. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad2e47c90690500114b0715ac93fdea0"></a><!-- doxytag: member="RSAMConstMappingIterator::rsam" ref="aad2e47c90690500114b0715ac93fdea0" args="" -->
const <a class="el" href="a00182.html">RadioStateAnalogueModel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#aad2e47c90690500114b0715ac93fdea0">rsam</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the RSAM module. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af50e95907f71f9fba359cb559549cef3"></a><!-- doxytag: member="RSAMConstMappingIterator::it" ref="af50e95907f71f9fba359cb559549cef3" args="" -->
RadioStateAnalogueModel::time_attenuation_collection_type::const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#af50e95907f71f9fba359cb559549cef3">it</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">List iterator pointing to the current position. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9039bc33a7d35f7fefa980d1bc48ad5f"></a><!-- doxytag: member="RSAMConstMappingIterator::position" ref="a9039bc33a7d35f7fefa980d1bc48ad5f" args="" -->
<a class="el" href="a00013.html">Argument</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f">position</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The current position of this iterator. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a926d1e5571f715a515233de3f245dea2"></a><!-- doxytag: member="RSAMConstMappingIterator::nextPosition" ref="a926d1e5571f715a515233de3f245dea2" args="" -->
<a class="el" href="a00013.html">Argument</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a926d1e5571f715a515233de3f245dea2">nextPosition</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The next position the iterator will jump to. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44e62faddab1436a85e70e80d00080ab"></a><!-- doxytag: member="RSAMConstMappingIterator::signalStart" ref="a44e62faddab1436a85e70e80d00080ab" args="" -->
simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a44e62faddab1436a85e70e80d00080ab">signalStart</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The start time of the signal this iterators mapping attenuates. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f51b46c71a890d8331afb993bf1cc54"></a><!-- doxytag: member="RSAMConstMappingIterator::signalEnd" ref="a1f51b46c71a890d8331afb993bf1cc54" args="" -->
simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a1f51b46c71a890d8331afb993bf1cc54">signalEnd</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The end time of the signal this iterators mapping attenuates. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0229778be6916b25666e3d11ab82fd01"></a><!-- doxytag: member="RSAMConstMappingIterator::RSAMConstMappingIterator" ref="a0229778be6916b25666e3d11ab82fd01" args="(const RSAMConstMappingIterator &amp;)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#a0229778be6916b25666e3d11ab82fd01">RSAMConstMappingIterator</a> (const <a class="el" href="a00188.html">RSAMConstMappingIterator</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor is not allowed. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3cb210d24799738fd2971116477f45c"></a><!-- doxytag: member="RSAMConstMappingIterator::operator=" ref="aa3cb210d24799738fd2971116477f45c" args="(const RSAMConstMappingIterator &amp;)" -->
<a class="el" href="a00188.html">RSAMConstMappingIterator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html#aa3cb210d24799738fd2971116477f45c">operator=</a> (const <a class="el" href="a00188.html">RSAMConstMappingIterator</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator is not allowed. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>ConstMapingIterator implementation for a RSAM. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7dd83432a7cd3ff5d1f827cb34f61a32"></a><!-- doxytag: member="RSAMConstMappingIterator::inRange" ref="a7dd83432a7cd3ff5d1f827cb34f61a32" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool RSAMConstMappingIterator::inRange </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if the current position of the iterator is in range of the function. </p>
<p>This method should be used as end-condition when iterating over the function with the "next()" method. </p>

<p>Implements <a class="el" href="a00059.html#a4a6348a453418da95978e570fec046fc">ConstMappingIterator</a>.</p>

<p>References <a class="el" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a">Argument::getTime()</a>, <a class="el" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f">position</a>, <a class="el" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4">RadioStateAnalogueModel::radioStateAttenuation</a>, <a class="el" href="a00188.html#aad2e47c90690500114b0715ac93fdea0">rsam</a>, <a class="el" href="a00188.html#a1f51b46c71a890d8331afb993bf1cc54">signalEnd</a>, and <a class="el" href="a00188.html#a44e62faddab1436a85e70e80d00080ab">signalStart</a>.</p>
<div class="fragment"><pre class="fragment">{
  simtime_t_cref t             = <a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>();
  simtime_t_cref lastEntryTime = std::max(<a class="code" href="a00188.html#aad2e47c90690500114b0715ac93fdea0" title="Pointer to the RSAM module.">rsam</a>-&gt;<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.back().getTime(), <a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab" title="The start time of the signal this iterators mapping attenuates.">signalStart</a>);

  <span class="keywordflow">return</span>  <a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab" title="The start time of the signal this iterators mapping attenuates.">signalStart</a> &lt;= t
      &amp;&amp; t &lt;= <a class="code" href="a00188.html#a1f51b46c71a890d8331afb993bf1cc54" title="The end time of the signal this iterators mapping attenuates.">signalEnd</a>
      &amp;&amp; t &lt;= lastEntryTime;

}
</pre></div>
</div>
</div>
<a class="anchor" id="a3740e6b65c335fcde632e296b56070de"></a><!-- doxytag: member="RSAMConstMappingIterator::jumpTo" ref="a3740e6b65c335fcde632e296b56070de" args="(const Argument &amp;pos)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RSAMConstMappingIterator::jumpTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lets the iterator point to the passed position. </p>
<p>The passed new position can be at arbitary places, jumping explicitly before signalStart is allowed. </p>

<p>Implements <a class="el" href="a00059.html#ae3cdbe2115d0e87af0da549b675f2bf8">ConstMappingIterator</a>.</p>

<p>References <a class="el" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a">Argument::getTime()</a>, <a class="el" href="a00188.html#af50e95907f71f9fba359cb559549cef3">it</a>, <a class="el" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f">position</a>, <a class="el" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4">RadioStateAnalogueModel::radioStateAttenuation</a>, <a class="el" href="a00188.html#aad2e47c90690500114b0715ac93fdea0">rsam</a>, <a class="el" href="a00188.html#a082fa16cd2eaa7ac2dd0b16b66660317">setNextPosition()</a>, and <a class="el" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9">Argument::setTime()</a>.</p>

<p>Referenced by <a class="el" href="a00189.html#a79e3de9b0f3220b01dd28346e51ae019">RSAMMapping::createConstIterator()</a>.</p>
<div class="fragment"><pre class="fragment">{
  <span class="comment">// extract the time-component from the argument</span>
  simtime_t_cref t = pos.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>();

  assert( !(<a class="code" href="a00188.html#aad2e47c90690500114b0715ac93fdea0" title="Pointer to the RSAM module.">rsam</a>-&gt;<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.empty()) &amp;&amp;
      !(t &lt; rsam-&gt;radioStateAttenuation.front().getTime()) );

  <span class="comment">// current position is already correct</span>
  <span class="keywordflow">if</span>( t == <a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>() )
    <span class="keywordflow">return</span>;

  <span class="comment">// this automatically goes over all zero time switches</span>
  <a class="code" href="a00188.html#af50e95907f71f9fba359cb559549cef3" title="List iterator pointing to the current position.">it</a> = upper_bound(<a class="code" href="a00188.html#aad2e47c90690500114b0715ac93fdea0" title="Pointer to the RSAM module.">rsam</a>-&gt;<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.begin(), <a class="code" href="a00188.html#aad2e47c90690500114b0715ac93fdea0" title="Pointer to the RSAM module.">rsam</a>-&gt;<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.end(), t);

  --<a class="code" href="a00188.html#af50e95907f71f9fba359cb559549cef3" title="List iterator pointing to the current position.">it</a>;
  <a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(t);
  <a class="code" href="a00188.html#a082fa16cd2eaa7ac2dd0b16b66660317" title="Helper function that sets member nextPosition. Presumes that iterator it and member position are set ...">setNextPosition</a>();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a3a34a4fb1e22f7e0bbac13e21d08415e"></a><!-- doxytag: member="RSAMConstMappingIterator::jumpToBegin" ref="a3a34a4fb1e22f7e0bbac13e21d08415e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void RSAMConstMappingIterator::jumpToBegin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lets the iterator point to the begin of the function. </p>
<p>The beginning of the function depends on the implementation. </p>

<p>Implements <a class="el" href="a00059.html#a6b6af19266855c21ce3e3449de3f0d6f">ConstMappingIterator</a>.</p>

<p>References <a class="el" href="a00059.html#ae3cdbe2115d0e87af0da549b675f2bf8">ConstMappingIterator::jumpTo()</a>.</p>

<p>Referenced by <a class="el" href="a00188.html#a88568a19f3ddbae8645fdabffc2dc2a5">RSAMConstMappingIterator()</a>.</p>
<div class="fragment"><pre class="fragment">                             {
    <a class="code" href="a00188.html#a3740e6b65c335fcde632e296b56070de" title="Lets the iterator point to the passed position.">jumpTo</a>(<a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab" title="The start time of the signal this iterators mapping attenuates.">signalStart</a>);
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a919ae04b93ed239dc2f5566a383f28d4"></a><!-- doxytag: member="RSAMConstMappingIterator::next" ref="a919ae04b93ed239dc2f5566a383f28d4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void RSAMConstMappingIterator::next </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Iterates to the next position of the function. </p>
<p>The next position depends on the implementation of the Function. </p>

<p>Implements <a class="el" href="a00059.html#afdafa6870cd19b3d35674a7bc777585d">ConstMappingIterator</a>.</p>

<p>References <a class="el" href="a00059.html#a607d741e2d841265851a85670f247c46">ConstMappingIterator::iterateTo()</a>.</p>
<div class="fragment"><pre class="fragment">                      {
    <a class="code" href="a00188.html#a7694574b32a82ddbfa3e86bed32be016" title="Iterates to the specified position. This method should be used if the new position is near the curren...">iterateTo</a>(<a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2" title="The next position the iterator will jump to.">nextPosition</a>);
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a082fa16cd2eaa7ac2dd0b16b66660317"></a><!-- doxytag: member="RSAMConstMappingIterator::setNextPosition" ref="a082fa16cd2eaa7ac2dd0b16b66660317" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RSAMConstMappingIterator::setNextPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Helper function that sets member nextPosition. Presumes that iterator it and member position are set correctly. </p>
<p>This function does not care for zero time switches! This must be done before!</p>
<p>Might be helpful if position of iterator it has not been set by upper_bound before (it has not just been standing on the "nextPosition"). </p>

<p>References <a class="el" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a">Argument::getTime()</a>, <a class="el" href="a00188.html#a1a5d0e40bb42450fb2158e6172cc27d1">hasNext()</a>, <a class="el" href="a00138.html#a28683c5c7dcc795157020a36043a1de3">MappingUtils::incNextPosition()</a>, <a class="el" href="a00188.html#af50e95907f71f9fba359cb559549cef3">it</a>, <a class="el" href="a00188.html#a926d1e5571f715a515233de3f245dea2">nextPosition</a>, <a class="el" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f">position</a>, <a class="el" href="a00138.html#a2cf7c04c0adea7f6e9fe49101b0197c3">MappingUtils::pre()</a>, <a class="el" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9">Argument::setTime()</a>, and <a class="el" href="a00188.html#a44e62faddab1436a85e70e80d00080ab">signalStart</a>.</p>

<p>Referenced by <a class="el" href="a00188.html#a7694574b32a82ddbfa3e86bed32be016">iterateTo()</a>, and <a class="el" href="a00188.html#a3740e6b65c335fcde632e296b56070de">jumpTo()</a>.</p>
<div class="fragment"><pre class="fragment">{
  <span class="keywordflow">if</span> (<a class="code" href="a00188.html#a1a5d0e40bb42450fb2158e6172cc27d1" title="Returns true if the iterator has a next value inside its range.">hasNext</a>()) <span class="comment">// iterator it does not stand on last entry and next entry is before signal end</span>
  {
    <span class="keywordflow">if</span>(<a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>() &lt; <a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab" title="The start time of the signal this iterators mapping attenuates.">signalStart</a>) <span class="comment">//signal start is our first key entry</span>
    {
      <a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2" title="The next position the iterator will jump to.">nextPosition</a>.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(<a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab" title="The start time of the signal this iterators mapping attenuates.">signalStart</a>);
    } <span class="keywordflow">else</span>
    {
        RadioStateAnalogueModel::time_attenuation_collection_type::const_iterator it2 = <a class="code" href="a00188.html#af50e95907f71f9fba359cb559549cef3" title="List iterator pointing to the current position.">it</a>;
      ++it2;

      assert(<a class="code" href="a00188.html#af50e95907f71f9fba359cb559549cef3" title="List iterator pointing to the current position.">it</a>-&gt;getTime() &lt;= <a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>() &amp;&amp; <a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>() &lt; it2-&gt;getTime());

      <span class="comment">//point in time for the &quot;pre step&quot; of the next real key entry</span>
      simtime_t_cref preTime = <a class="code" href="a00138.html#a2cf7c04c0adea7f6e9fe49101b0197c3" title="returns the closest value of simtime before passed value">MappingUtils::pre</a>(it2-&gt;getTime());

      <span class="keywordflow">if</span>(<a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>() == preTime) {
        <a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2" title="The next position the iterator will jump to.">nextPosition</a>.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(it2-&gt;getTime());
      }
      <span class="keywordflow">else</span> {
        <a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2" title="The next position the iterator will jump to.">nextPosition</a>.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(preTime);
      }
    }

  } <span class="keywordflow">else</span> <span class="comment">// iterator it stands on last entry or next entry whould be behind signal end</span>
  {
    <a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2" title="The next position the iterator will jump to.">nextPosition</a>.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(<a class="code" href="a00138.html#a28683c5c7dcc795157020a36043a1de3" title="returns the incremented position point (used in RSAMConstMappingIterator::setNextPosition).">MappingUtils::incNextPosition</a>(<a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>()));
  }
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00303_source.html">PhyUtils.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/PhyUtils.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00188.html">RSAMConstMappingIterator</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:33 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
